.class public abstract LVitxI/RvsWM;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/io/Closeable;


# instance fields
.field private BGjPC:Ljava/io/Reader;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static Dfllc(LVitxI/tANII;JLAEisT/nzTMR;)LVitxI/RvsWM;
    .locals 3

    if-nez p3, :cond_0

    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "source == null"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    new-instance v0, LVitxI/EXbjZ;

    invoke-direct {v0, p0, p1, p2, p3}, LVitxI/EXbjZ;-><init>(LVitxI/tANII;JLAEisT/nzTMR;)V

    return-object v0
.end method

.method public static LYpEF(LVitxI/tANII;[B)LVitxI/RvsWM;
    .locals 4

    new-instance v0, LAEisT/OyUcY;

    invoke-direct {v0}, LAEisT/OyUcY;-><init>()V

    invoke-virtual {v0, p1}, LAEisT/OyUcY;->Iemzv([B)LAEisT/OyUcY;

    move-result-object v0

    array-length v1, p1

    int-to-long v2, v1

    invoke-static {p0, v2, v3, v0}, LVitxI/RvsWM;->Dfllc(LVitxI/tANII;JLAEisT/nzTMR;)LVitxI/RvsWM;

    move-result-object v0

    return-object v0
.end method

.method private jIIcm()Ljava/nio/charset/Charset;
    .locals 2

    invoke-virtual {p0}, LVitxI/RvsWM;->NoQYq()LVitxI/tANII;

    move-result-object v0

    if-eqz v0, :cond_0

    sget-object v1, LVitxI/jtHon/AthHa;->xZhKt:Ljava/nio/charset/Charset;

    invoke-virtual {v0, v1}, LVitxI/tANII;->mHTfX(Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    sget-object v0, LVitxI/jtHon/AthHa;->xZhKt:Ljava/nio/charset/Charset;

    goto :goto_0
.end method

.method public static naUJR(LVitxI/tANII;Ljava/lang/String;)LVitxI/RvsWM;
    .locals 4

    sget-object v0, LVitxI/jtHon/AthHa;->xZhKt:Ljava/nio/charset/Charset;

    if-eqz p0, :cond_0

    invoke-virtual {p0}, LVitxI/tANII;->BDfCY()Ljava/nio/charset/Charset;

    move-result-object v0

    if-nez v0, :cond_0

    sget-object v0, LVitxI/jtHon/AthHa;->xZhKt:Ljava/nio/charset/Charset;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "; charset=utf-8"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, LVitxI/tANII;->vuFMR(Ljava/lang/String;)LVitxI/tANII;

    move-result-object p0

    :cond_0
    new-instance v1, LAEisT/OyUcY;

    invoke-direct {v1}, LAEisT/OyUcY;-><init>()V

    invoke-virtual {v1, p1, v0}, LAEisT/OyUcY;->lBdHM(Ljava/lang/String;Ljava/nio/charset/Charset;)LAEisT/OyUcY;

    move-result-object v0

    invoke-virtual {v0}, LAEisT/OyUcY;->vILFo()J

    move-result-wide v2

    invoke-static {p0, v2, v3, v0}, LVitxI/RvsWM;->Dfllc(LVitxI/tANII;JLAEisT/nzTMR;)LVitxI/RvsWM;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method public final ATHEi()Ljava/io/InputStream;
    .locals 1

    invoke-virtual {p0}, LVitxI/RvsWM;->OaZYh()LAEisT/nzTMR;

    move-result-object v0

    invoke-interface {v0}, LAEisT/nzTMR;->CeimE()Ljava/io/InputStream;

    move-result-object v0

    return-object v0
.end method

.method public final ElwkK()Ljava/lang/String;
    .locals 3

    new-instance v0, Ljava/lang/String;

    invoke-virtual {p0}, LVitxI/RvsWM;->KRndg()[B

    move-result-object v1

    invoke-direct {p0}, LVitxI/RvsWM;->jIIcm()Ljava/nio/charset/Charset;

    move-result-object v2

    invoke-virtual {v2}, Ljava/nio/charset/Charset;->name()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V

    return-object v0
.end method

.method public final KRndg()[B
    .locals 6

    invoke-virtual {p0}, LVitxI/RvsWM;->LxgVx()J

    move-result-wide v0

    const-wide/32 v2, 0x7fffffff

    cmp-long v2, v0, v2

    if-lez v2, :cond_0

    new-instance v2, Ljava/io/IOException;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "Cannot buffer entire body for content length: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v2, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v2

    :cond_0
    invoke-virtual {p0}, LVitxI/RvsWM;->OaZYh()LAEisT/nzTMR;

    move-result-object v2

    :try_start_0
    invoke-interface {v2}, LAEisT/nzTMR;->wyQKc()[B
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v3

    invoke-static {v2}, LVitxI/jtHon/AthHa;->PYZDX(Ljava/io/Closeable;)V

    const-wide/16 v4, -0x1

    cmp-long v2, v0, v4

    if-eqz v2, :cond_1

    array-length v2, v3

    int-to-long v4, v2

    cmp-long v0, v0, v4

    if-eqz v0, :cond_1

    new-instance v0, Ljava/io/IOException;

    const-string v1, "Content-Length and stream length disagree"

    invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v0

    :catchall_0
    move-exception v0

    invoke-static {v2}, LVitxI/jtHon/AthHa;->PYZDX(Ljava/io/Closeable;)V

    throw v0

    :cond_1
    return-object v3
.end method

.method public abstract LxgVx()J
.end method

.method public abstract NoQYq()LVitxI/tANII;
.end method

.method public abstract OaZYh()LAEisT/nzTMR;
.end method

.method public final YAOWu()Ljava/io/Reader;
    .locals 3

    iget-object v0, p0, LVitxI/RvsWM;->BGjPC:Ljava/io/Reader;

    if-eqz v0, :cond_0

    :goto_0
    return-object v0

    :cond_0
    new-instance v0, Ljava/io/InputStreamReader;

    invoke-virtual {p0}, LVitxI/RvsWM;->ATHEi()Ljava/io/InputStream;

    move-result-object v1

    invoke-direct {p0}, LVitxI/RvsWM;->jIIcm()Ljava/nio/charset/Charset;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V

    iput-object v0, p0, LVitxI/RvsWM;->BGjPC:Ljava/io/Reader;

    goto :goto_0
.end method

.method public close()V
    .locals 1

    invoke-virtual {p0}, LVitxI/RvsWM;->OaZYh()LAEisT/nzTMR;

    move-result-object v0

    invoke-static {v0}, LVitxI/jtHon/AthHa;->PYZDX(Ljava/io/Closeable;)V

    return-void
.end method
